/**
 * Created by zhangli on 2016/12/7.
 */
var msg_num = 34;
var temp = 0;
var t = 1000;
$(window).on("load", function () {
    $(".di").height($("#di_img").height());
    var q_num = 34;
    for (var i = 0; i < q_num; i++) {
        if ($("#msg" + i).find(".mcontent").length > 0) {
            $("#msg" + i).height($("#msg" + i).find(".mcontent").outerHeight(true) + 20);
        } else {
            $("#msg" + i).height($("#msg" + i).find(".redpick").outerHeight(true) + 20);
        }
    }
    $(".massge").hide();
    setTimeout('showMsg()', t);
});
function showMsg() {
    $("#cover").hide();
    myAudio = document.getElementById("audio1");
    myAudio.play();
    $("#msg" + temp).show();
    $('.main').scrollTop(10000);
    temp++;
    t = Math.floor(($("#msg" + temp).height() - 68) / 43) * 500 + 1800;
    if (temp < msg_num) {
        setTimeout('showMsg()', t);
    }
}